#include <iostream>
using namespace std;

void my_swap(int &a, int &b){
    cout << "&a:" << &a << "  " << "&b:" << &b << endl; // 和下面xy的地址一样
    int temp = a;
    a = b;
    b = temp;
}

int main(int argc, const char *argv[]){
    int x = 10;
    int y = 20;
    my_swap(x, y);
    cout << "&x:" << &x << "  " << "&y:" << &y << endl; // 和上面ab的地址一样
    cout << x << "  " << y << endl; // 20 10
    return 0;
}